<template>
  <div class="MakeLink">
    <!-- 自定义 header slot -->
    <div slot="title" class="MakeLink-dialog-title">
      <span class="MakeLink-title-text">开通建链配置</span>
      <img
        src="@/assets/images/taskDefinition/close.png"
        alt=""
        @click="closeDialog"
      />
    </div>
    <!-- 这里是你自定义的内容 -->
    <div class="MakeLink-dialog-content">
      <!-- 可以添加任何自定义内容 -->
      <!-- 如果是地图页面进入的，就不显示这部分了 -->
      <div>
        <el-form ref="form" :model="MakeLinkForm" label-width="130px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="任务名称：">
                <div class="MakeLink-input">
                  <el-input
                    v-model="MakeLinkForm.taskName"
                    placeholder="请输入任务名称"
                  >
                  </el-input>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="通信设备类型：">
                <div class="MakeLink-select">
                  <el-select
                    v-model="MakeLinkForm.deviceType"
                    placeholder="请选择执行策略"
                  >
                    <el-option label="C频段散射通信设备" :value="1"></el-option>
                    <el-option
                      label="Ku频段散射通信设备"
                      :value="2"
                    ></el-option>
                    <el-option
                      label="VHF/UHF频段电台设备"
                      :value="3"
                    ></el-option>
                  </el-select>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <!-- 情况为单次执行，需要发送开始时间和结束时间 -->
          <template>
            <el-row>
              <el-col :span="12">
                <el-form-item label="开始时间：">
                  <div class="MakeLink-cron-date-picker">
                    <el-date-picker
                      v-model="MakeLinkForm.startTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      placeholder="选择日期时间"
                    >
                    </el-date-picker>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="结束时间：">
                  <div class="MakeLink-cron-date-picker">
                    <el-date-picker
                      v-model="MakeLinkForm.endTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      placeholder="选择日期时间"
                    >
                    </el-date-picker>
                  </div>
                </el-form-item>
              </el-col>
            </el-row>
          </template>
        </el-form>
      </div>

      <!-- 位置信息 -->
      <div
        class="MakeLink-title"
        v-if="[1, 2].includes(MakeLinkForm.deviceType)"
      >
        <div class="MakeLink-title-text">本端位置信息</div>
        <div class="MakeLink-title-text">对端位置信息</div>
      </div>

      <div v-if="[1, 2].includes(MakeLinkForm.deviceType)">
        <el-form ref="form" :model="MakeLinkForm" label-width="130px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="获取方式：">
                <div class="MakeLink-input-radio">
                  <el-radio-group v-model="getMethod">
                    <el-radio :label="0">自动获取</el-radio>
                    <el-radio :label="1">手动输入</el-radio>
                  </el-radio-group>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="12" v-if="getMethod === 0">
              <el-form-item label="对端北斗编号：">
                <div class="MakeLink-select">
                  <el-input
                    v-model="MakeLinkForm.remoteBdNum"
                    placeholder="请输入对端北斗编号"
                  >
                  </el-input>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="getMethod === 1">
            <el-col :span="12">
              <el-form-item label="经度：">
                <div class="MakeLink-input">
                  <el-input
                    v-model="MakeLinkForm.localLongitude"
                    placeholder="请输入经度"
                  >
                  </el-input>
                  <span class="Unit">°</span>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="经度：">
                <div class="MakeLink-select">
                  <el-input
                    v-model="MakeLinkForm.remoteLongitude"
                    placeholder="请输入经度"
                  >
                  </el-input>
                  <span class="Unit">°</span>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="getMethod === 1">
            <el-col :span="12">
              <el-form-item label="纬度：">
                <div class="MakeLink-input">
                  <el-input
                    v-model="MakeLinkForm.localLatitude"
                    placeholder="请输入纬度"
                  >
                  </el-input>
                  <span class="Unit">°</span>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="纬度：">
                <div class="MakeLink-select">
                  <el-input
                    v-model="MakeLinkForm.remoteLatitude"
                    placeholder="请输入纬度"
                  >
                  </el-input>
                  <span class="Unit">°</span>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="getMethod === 1">
            <el-col :span="12">
              <el-form-item label="海拔：">
                <div class="MakeLink-input">
                  <el-input
                    v-model="MakeLinkForm.localAltitude"
                    placeholder="请输入海拔"
                  >
                  </el-input>
                  <span class="Unit">m</span>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="海拔：">
                <div class="MakeLink-select">
                  <el-input
                    v-model="MakeLinkForm.remoteAltitude"
                    placeholder="请输入海拔"
                  >
                  </el-input>
                  <span class="Unit">m</span>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row v-if="getMethod === 1">
            <el-col :span="12">
              <el-form-item label="初始俯仰：">
                <div class="MakeLink-select">
                  <el-input
                    v-model="MakeLinkForm.initialPitch"
                    placeholder="请输入初始俯仰"
                  >
                  </el-input>
                  <span class="Unit">°</span>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <!-- <el-form-item label="远端方位：">
                <div class="MakeLink-select">
                  <el-input
                    v-model="MakeLinkForm.remotePitchAngle"
                    placeholder="请输入远端方位"
                  >
                  </el-input>
                </div>
              </el-form-item> -->
            </el-col>
          </el-row>
        </el-form>
      </div>

      <!-- 开通信息 -->
      <div class="MakeLink-title">
        <div class="MakeLink-title-text">开通设置</div>
        <div class="MakeLink-title-text"></div>
      </div>

      <div>
        <el-form ref="form" :model="MakeLinkForm" label-width="110px">
          <el-row>
            <el-col :span="8" v-if="[1, 2].includes(MakeLinkForm.deviceType)">
              <el-form-item label="设备类型：">
                <div class="MakeLink-input-radio">
                  <el-radio-group v-model="MakeLinkForm.scatteringDeviceType">
                    <el-radio label="A">A型</el-radio>
                    <el-radio label="B">B型</el-radio>
                  </el-radio-group>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="[3].includes(MakeLinkForm.deviceType)">
              <el-form-item label="波形类型：">
                <div class="MakeLink-select-small">
                  <el-select
                    v-model="MakeLinkForm.waveType"
                    placeholder="请选择波形类型"
                  >
                    <el-option label="171" :value="0"></el-option>
                    <el-option label="173" :value="1"></el-option>
                  </el-select>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="波道号：">
                <div class="MakeLink-select-small">
                  <el-input
                    v-model="MakeLinkForm.channel"
                    placeholder="请输入波道号"
                  >
                  </el-input>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-if="[3].includes(MakeLinkForm.deviceType)">
              <el-form-item label="发送功率：">
                <div class="MakeLink-select-small">
                  <el-select
                    v-model="MakeLinkForm.sendPower"
                    placeholder="请选择发送功率"
                  >
                    <el-option label="小功率" :value="1"></el-option>
                    <el-option label="大功率" :value="3"></el-option>
                  </el-select>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="8" v-else>
              <el-form-item label="发送功率：">
                <div class="MakeLink-input-small">
                  <el-input
                    v-model="MakeLinkForm.sendPower"
                    placeholder="请输入发送功率"
                  >
                  </el-input>
                  <span class="Unit">dBm</span>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="14">
              <el-form-item label="频率类型：">
                <div class="MakeLink-input-radio">
                  <el-radio-group v-model="MakeLinkForm.freqType">
                    <el-radio :label="1">点频</el-radio>
                    <el-radio :label="2">跳频</el-radio>
                    <el-radio :label="3">扫频</el-radio>
                  </el-radio-group>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <!-- C，Ku  与 点频 -->
            <template
              v-if="
                [1, 2].includes(MakeLinkForm.deviceType) &&
                [1].includes(MakeLinkForm.freqType)
              "
            >
              <el-col :span="8">
                <el-form-item label="L：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.freq"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="H：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.highFreq"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
            </template>
            <!-- C，Ku  与 跳频  -->
            <template
              v-else-if="
                [1, 2].includes(MakeLinkForm.deviceType) &&
                [2].includes(MakeLinkForm.freqType)
              "
            >
              <!-- <el-col :span="2">
                <div class="fre-table" @click="setFre">频率表</div>
              </el-col> -->
              <!-- <el-col :span="6">
                <el-form-item label="L：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.lFreq">
                    </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="H：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.hFreq">
                    </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col> -->
            </template>
            <!-- C，Ku  与 扫频  -->
            <template
              v-else-if="
                [1, 2].includes(MakeLinkForm.deviceType) &&
                [3].includes(MakeLinkForm.freqType)
              "
            >
              <el-col :span="5">
                <el-form-item label="L开始：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.freq"> </el-input>
                    <span class="Unit-small">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item label="L结束：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.stopFreq"> </el-input>
                    <span class="Unit-small">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="间隔：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.freqInterval"> </el-input>
                    <span class="Unit-small">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
            </template>

            <!-- V/U  与 点频 -->
            <template
              v-else-if="
                [3].includes(MakeLinkForm.deviceType) &&
                [1].includes(MakeLinkForm.freqType)
              "
            >
              <el-col :span="16">
                <el-form-item label="通信频率：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.freq"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
            </template>
            <!-- V/U  与 跳频 -->
            <template
              v-else-if="
                [3].includes(MakeLinkForm.deviceType) &&
                [2].includes(MakeLinkForm.freqType)
              "
            >
              <el-col :span="16">
                <el-form-item label="跳表号：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.jumpTableNum"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
            </template>
            <!-- V/U  与 扫频 -->
            <template
              v-else-if="
                [3].includes(MakeLinkForm.deviceType) &&
                [3].includes(MakeLinkForm.freqType)
              "
            >
              <el-col :span="8">
                <el-form-item label="开始通信频率：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.freq"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="结束通信频率：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.stopFreq"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="间隔：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.freqInterval"> </el-input>
                    <span class="Unit">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
            </template>
          </el-row>

          <el-row>
            <!-- C，Ku  与 扫频  -->
            <template
              v-if="
                [1, 2].includes(MakeLinkForm.deviceType) &&
                [3].includes(MakeLinkForm.freqType)
              "
            >
              <el-col :span="5">
                <el-form-item label="H开始：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.highFreq"> </el-input>
                    <span class="Unit-small">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="15">
                <el-form-item label="H结束：">
                  <div class="MakeLink-input-mini">
                    <el-input v-model="MakeLinkForm.stopHighFreq"> </el-input>
                    <span class="Unit-small">MHz</span>
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="4">
                <div class="fre-table saveBtn" @click="defineTask">保存</div>
              </el-col>
            </template>
            <template v-else>
              <el-col :span="20">
                <!-- 为了占位置，使保存按钮居右 -->
                <el-form-item label=""> </el-form-item
              ></el-col>
              <el-col :span="4">
                <div class="fre-table saveBtn" @click="defineTask">保存</div>
              </el-col>
            </template>
          </el-row>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MakeLink",
  data() {
    return {
      MakeLinkForm: {
        dataSetId: 1, //测试数据集id
        taskName: "测试", //任务名称
        testType: "1", //测试类型，1：话音，2：数据，3：视频
        errorStrategy: 0, //异常处理策略，0：恢复，1：终止
        triggerRule: 1, //触发规则，1：单次触发，2：周期触发
        startTime: "2025-05-13 10:00:00", //测试开始时间，单次触发填写
        endTime: "2025-05-13 11:00:00", //测试结束时间，单次触发填写
        cron: "0 5 * * * ?", //cron表达式，周期触发填写
        duration: 30, //任务执行时长，单位分钟，周期触发时配置的任务执行的时长
        endStrategy: 1, //执行策略，1：截止时间优先，2：测试完成优先
        deviceType: 1, //设备类型，1：C，2：Ku，3：VU
        sendFlag: "0", //发送端标识，0：发送端，1：接收端 // 先默认发0

        localLongitude: "1", //本端经度
        localLatitude: "2", //本端纬度
        localAltitude: "3", //本端海拔
        remoteLongitude: "1", //对端经度
        remoteLatitude: "2", //对端纬度
        remoteAltitude: "3", //对端海拔
        initialPitch: 0, //本端初始方位
        remoteBdNum: "5", //对端北斗编号

        scatteringDeviceType: "A", //散射设备类型，A，B，散射设备填写
        waveType: 0, //uv设备波形类型，0：171，1：173，UV设备填写
        channel: 1, //波道号
        sendPower: "", //发射功率，散射设备是数值；vu台，1：小功率，3：大功率
        freqType: 1, //频率类型，1：点频，2：跳频，3：扫频
        freq: "1", //通信频率。uv的通信频率，同时也是散射低频频率
        stopFreq: "3", //结束通信频率。uv的扫频结束通信频率，同时也是散射扫频低频的结束频率
        highFreq: "2", //散射高频通信频率
        stopHighFreq: "4", //散射高频结束通信频率
        freqInterval: 10, //扫频频率间隔，uv、散射共用
        jumpTableNum: 1, //uv跳表号
        iqCollectFlag: 0, //IQ采集标志，0：不采集，1：采集
        iqBusinessData: "111100001111", //IQ业务数据，IQ不采集不填写
        iqCollectInterval: 10, //IQ采集时间间隔，IQ不采集不填写
      },
      // 获取方式
      getMethod: 1,
    };
  },
  computed: {},
  watch: {},
  components: {},
  props: {
    offsetY: {
      type: String,
      default: "0",
    },
  },
  methods: {
    // 关闭弹窗
    closeDialog() {
      this.$emit("closeDialog");
    },
    // 关闭遮罩层
    closeOverlay() {
      this.$emit("closeOverlay");
      this.$emit("closeDialog");
    },
    // 确定任务定义
    defineTask() {
      // 处理发送的数据
      // this.leavePageHandleData();
      console.log("点击保存了");
      this.$emit("sendData", this.MakeLinkForm);
      console.log("this.MakeLinkForm", this.MakeLinkForm);
      // window.location.reload();
    },
    // 离开页面，处理发送的数据
    leavePageHandleData() {
      if (
        [1, 2].includes(this.MakeLinkForm.deviceType) &&
        [1].includes(this.MakeLinkForm.freqType)
      ) {
        /* C，Ku  与 点频 */
        this.MakeLinkForm.freq = null; // 置空
        this.MakeLinkForm.stopFreq = null; // 置空
        this.MakeLinkForm.freqInterval = null; // 置空
        this.MakeLinkForm.jumpTableNum = null; // 置空
        this.MakeLinkForm.highFreq = null; // 置空
        this.MakeLinkForm.stopHighFreq = null; // 置空
      } else if (
        [1, 2].includes(this.MakeLinkForm.deviceType) &&
        [2].includes(this.MakeLinkForm.freqType)
      ) {
        /* C，Ku  与 跳频 */
        this.MakeLinkForm.freq = null; // 置空
        this.MakeLinkForm.stopFreq = null; // 置空
        this.MakeLinkForm.freqInterval = null; // 置空
        this.MakeLinkForm.jumpTableNum = null; // 置空
        this.MakeLinkForm.highFreq = null; // 置空
        this.MakeLinkForm.stopHighFreq = null; // 置空
      } else if (
        [1, 2].includes(this.MakeLinkForm.deviceType) &&
        [3].includes(this.MakeLinkForm.freqType)
      ) {
        /* C，Ku  与 扫频 */
        this.MakeLinkForm.freq = null; // 置空
        this.MakeLinkForm.stopFreq = null; // 置空
        this.MakeLinkForm.freqInterval = null; // 置空
        this.MakeLinkForm.jumpTableNum = null; // 置空
        this.MakeLinkForm.highFreq = null; // 置空
      } else if (
        [3].includes(this.MakeLinkForm.deviceType) &&
        [1].includes(this.MakeLinkForm.freqType)
      ) {
        /* V/U  与 点频 */
        this.MakeLinkForm.freq = null; // 置空
        this.MakeLinkForm.stopFreq = null; // 置空
        this.MakeLinkForm.freqInterval = null; // 置空
        this.MakeLinkForm.jumpTableNum = null; // 置空
        this.MakeLinkForm.highFreq = null; // 置空
        this.MakeLinkForm.stopHighFreq = null; // 置空
      } else if (
        [3].includes(this.MakeLinkForm.deviceType) &&
        [2].includes(this.MakeLinkForm.freqType)
      ) {
        /* V/U  与 跳频 */
        this.MakeLinkForm.freq = null; // 置空
        this.MakeLinkForm.freqInterval = null; // 置空
        this.MakeLinkForm.stopFreq = null; // 置空
        this.MakeLinkForm.highFreq = null; // 置空
        this.MakeLinkForm.stopHighFreq = null; // 置空
      } else if (
        [3].includes(this.MakeLinkForm.deviceType) &&
        [3].includes(this.MakeLinkForm.freqType)
      ) {
        /* V/U  与 扫频 */
        this.MakeLinkForm.jumpTableNum = null; // 置空
        this.MakeLinkForm.freq = null; // 置空
        this.MakeLinkForm.stopFreq = null; // 置空
        this.MakeLinkForm.freqInterval = null; // 置空
        this.MakeLinkForm.highFreq = null; // 置空
        this.MakeLinkForm.stopHighFreq = null; // 置空
      }

      if (this.MakeLinkForm.triggerRule == 1) {
        //单次触发
        this.MakeLinkForm.cron = ""; // 置空
        this.MakeLinkForm.duration = ""; // 置空
        // this.MakeLinkForm.month = ""; // 置空
        // this.MakeLinkForm.day = ""; // 置空
        // this.MakeLinkForm.hour = ""; // 置空
        // this.MakeLinkForm.minute = ""; // 置空
      } else {
        //周期触发
        this.MakeLinkForm.startTime = ""; // 置空
        this.MakeLinkForm.endTime = ""; // 置空
      }
      this.MakeLinkForm.id = ""; // 置空
    },
    // 计算结束时间
    calculateEndTimeByTimestamp(startTime, estimatedTransmissionDuration) {
      // 将startTime转换为Date对象
      const startDate = new Date(startTime);

      // 获取时间戳（毫秒）
      const startTimestamp = startDate.getTime();

      // 估算的传输持续时间转换为毫秒
      const durationInMillis = estimatedTransmissionDuration * 60 * 1000; // 10分钟 = 10 * 60 * 1000 毫秒

      // 计算endTime的时间戳
      const endTimestamp = startTimestamp + durationInMillis;

      // 将endTimestamp转换为Date对象
      const endDate = new Date(endTimestamp);

      // 获取年、月、日、小时、分钟、秒
      const year = endDate.getFullYear();
      const month = (endDate.getMonth() + 1).toString().padStart(2, "0"); // 月份从0开始，所以要加1
      const day = endDate.getDate().toString().padStart(2, "0");
      const hours = endDate.getHours().toString().padStart(2, "0");
      const minutes = endDate.getMinutes().toString().padStart(2, "0");
      const seconds = endDate.getSeconds().toString().padStart(2, "0");

      // 格式化为"YYYY-MM-DD HH:MM:SS"
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
  },
  mounted() {},
};
</script>
<!-- 因为是弹窗，所以全局方法 -->
<style lang="scss" scoped>
.MakeLink {
  position: relative;
  width: 100%; /* 自定义弹窗宽度 */
  background: url("~@/assets/images/taskDefinition/define-background.png")
    no-repeat;
  background-size: 100% 100%;
  .MakeLink-title {
    width: 100%;
    height: 2.5rem;
    line-height: 2.5rem;
    color: #fff;
    font-size: 1.125rem;
    margin: 0px 0.625rem 0.625rem 1.25rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    .MakeLink-title-text {
      background: url("~@/assets/images/taskDefinition/vice-title.png")
        no-repeat;
      background-size: 100% 100%;
      flex: 1;
      padding-left: 1.5626rem;
    }
  }
  .MakeLink-dialog-title {
    font-size: 1.375rem;
    font-weight: bold;
    background: url("~@/assets/images/taskDefinition/title.png") no-repeat;
    background-size: 100% 100%;
    height: 3.125rem;
    line-height: 3.125rem;
    margin: 0.3125rem;
    padding: 0 1.25rem;
    color: #b7e7fc;
    position: relative;
    .MakeLink-title-text {
      text-align: left;
    }
    img {
      width: 1.5626rem;
      height: 1.5626rem;
      float: right;
      margin-top: 0.75rem;
      cursor: pointer;
    }
  }
  .MakeLink-dialog-content {
    padding: 0.9375rem;
    .MakeLink-select,
    .MakeLink-input {
      width: 12.5rem;
      position: relative;
    }
    .MakeLink-select-small,
    .MakeLink-input-small {
      width: 7.5rem;
      position: relative;
    }
    .MakeLink-select-mini,
    .MakeLink-input-mini {
      width: 5.625rem;
      position: relative;
    }

    .MakeLink-cron {
      display: flex;
      flex-direction: row;
      align-items: center;
      .fre-table:hover {
        color: aqua;
      }
      .MakeLink-cron-select {
        width: 6.0625rem;
        margin-right: 0.375rem;
      }
      .MakeLink-cron-date {
        width: 11.1875rem;
        margin-right: 0.375rem;
      }
    }
  }
}
.saveBtn {
  text-align: center;
}

.Unit {
  display: inline-block;
  width: 3.4375rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: left;
  position: absolute;
  right: -3.625rem;
  font-size: 1.25rem;
  color: #fff;
}
.Unit-small {
  display: inline-block;
  width: 1.75rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: left;
  position: absolute;
  right: 0px;
  font-size: 0.75rem;
  color: #fff;
}

.fre-table {
  width: 5.625rem;
  height: 2.5rem;
  line-height: 2.5rem;
  text-align: center;
  color: #fff;
  background: url("~@/assets/images/taskDefinition/btn.png") no-repeat;
  background-size: 100% 100%;
  margin-right: 0.625rem;
  cursor: pointer;
}

.MakeLink-input-radio {
  display: flex;
  flex-direction: row;
  align-items: center;
  line-height: 2.5rem;
  height: 2.5rem;
}

.edit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3); /* 半透明黑色遮罩 */
  z-index: 999; /* 确保遮罩层在最上层 */
}
</style>
